package voovanHello;


import com.sun.net.httpserver.HttpServer;
import org.voovan.http.server.WebServer;
import org.voovan.http.server.context.WebServerConfig;

import java.io.IOException;

/**
 * Created by yunqisong on 2017/09/01.
 */
public class HttpServerTest {

    public static void main(String args[]) {

        try {
            new WebServer(new WebServerConfig())
                     .get("/test", (req, resp) -> {
                         resp.write("this is test Message.");
                     })
                     .get("/test1", (req1, resp1) -> {
                         resp1.write("this is test1 Message.");
                     })
                     .serve();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
